#include <iostream>
#include <list>
#include<winsock.h>
#include <exception>
#include <string.h>

using namespace std;
int main()
{
    list<int> s1;
    s1.push_back(10);
    s1.push_back(20);
    s1.push_back(50);
    s1.push_back(30);
    s1.push_back(70);

    list<int>::iterator it = s1.begin();

    for(it = s1.begin() ; it != s1.end() ; it++)
    {
        cout<<*it<<" ";
    }
    cout<<endl;

    list<int> s2(s1);
    s2.erase(s2.begin());

    for( list<int>::iterator it = s2.begin(); it != s2.end() ; it++)
    {
        cout<<*it<<" ";
    }
    cout<<endl;

cout<<"//////////////////////给链表赋值/////////////////////"<<endl;

    s1.assign(s2.begin(),s2.end());
    for( list<int>::iterator it = s1.begin(); it != s1.end() ; it++)
    {
        cout<<*it<<" ";
    }
    cout<<endl;

    return 0;
}


